<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>jquery源码解析视频77-1</title>
  <script src="../jquery-2.0.3.js"></script>
</head>

<body>


  <!-- parent方法的使用 -->
  <div>div<p>p<span>span</span></p>
  </div>
  <p>p<span>span</span></p>

  <!-- next -->
  <!-- <div>
    <span>span</span>
    sssssssss
    <p>p</p>
  </div> -->

  <script>
    $(function () {
      $("span").parent().css("border", "1px solid red");

      // next方法使用
      // $("span").next().css("border","1px solid red");



    });
  </script>
</body>

</html>